home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-11 / ezhelp10.zip / YOURPROG.C < prev   
C/C++ Source or Header  |  1993-01-04  |  1KB  |  53 lines

  1. /*
  2. ** FILE: Yourprog.c
  3. **
  4. ** Example of linking ez_help into your application
  5. **
  6. ** These files are linked into Yourprog:
  7. **    ez_help, ezhelp1, ezhelp2
  8. **
  9. */
  10.  
  11. #include <stdio.h>
  12. #include <stdlib.h>
  13. #include <string.h>
  14. #include <dir.h>
  15. #include <mem.h>
  16. #include <dos.h>
  17. #include "ezhelp.h"
  18.  
  19. /* 1. include ezhelp.h in your program */
  20.  
  21. static ezhelp_env env;
  22.  
  23. /* 2. Place the above declaration at the top of your program    */
  24. /*    or in the routine that calls ez_help.                     */
  25.  
  26. main() {
  27.  
  28.   char myfile[21] = { "d:\\help\\ezhelp.txt " };
  29.   myfile[20] = 0;
  30.   memset(&env,0,(long)sizeof(ezhelp_env));
  31.  
  32.  
  33. /* 3. Place the reference file name in env.ref_file */
  34.  
  35.   strcat(&env.ref_file[0],&myfile[0]);
  36.  
  37. /* 4. Fill options into env fields. */
  38.  
  39.   env.bar_colo    = 79;   /* bar color */
  40.   env.win_colo    = 31;   /* window color */
  41.   env.window_size = 18;   /* size of window 5 - 23 */
  42.  
  43. /* 5. Env.start_menu and env.show_errors are required. */
  44.  
  45.   env.start_menu  = 1;    /* startup menu number */
  46.   env.show_errors = 0;    /* 1 = display errors */
  47.  
  48. /* 6. Call ez_help with the address of env. */
  49.  
  50.   ez_help(&env);
  51.  
  52. }
  53.